Determining a geographic location of a computer according to an IP address of the computer has a wide range of applications, such as online advertisement, electronic commerce, application monitoring, network diagnosis, etc. Taking online advertisement as an example, if the websites can exactly determine a geographic location of a user according to an IP address of the user's computer, it is possible to display advertisement information near the user on the website such as cinemas near the community of the user, instead of displaying advertisement information that is not related with the user's location.
The conventional methods for positioning an IP location mainly comprise a method based on delay measurement and a method based on database. The method based on delay measurement comprises steps of: arranging a plurality of servers in different areas; measuring a network delay between each server and the IP location by these servers; and determining an actual distance between each server and the IP location according to the network delays. This method generally offers a precision ranging from 10 km to 40 km. However, as the method needs to arrange servers on a large scale, the cost of the method is comparatively high. Moreover, as a lot of network delays need to be measured, a response time ranging from dozens of seconds to a few minutes is needed for positioning the geographic location of an IP address. The method based on database stores the collected information such as IP registration information, domain name registration information and location information submitted by the user into the database and then determines the location of the IP address according to this information. This method has advantages of a short response time, as it only needs to query the database when the location of the IP address is required to be determined. However, as the precision of the collected data is low, the method may only achieve a precision above 70 km, which can only meet the precision requirements on city level.
Specifically, the method based on delay measurement comprises GeoPing, CBG, TBG, Octant, WangGeo, etc. GeoPing is the simplest method among them, which directly determines the location of the server with a shortest network delay between the server and a target IP to be the location of the IP address and has a positioning precision above 300 km. CBG estimates the corresponding distances between each server and the target IP according to the network delays between each server and the target IP, determines a possible area of the target IP according to each corresponding distance, and then uses the intersection of all the possible areas as the location of the target IP. The positioning precision of CBG is approximately 200 km. TBG and Octant further combine with the topological structure on the basis of CBG, so that the target IP is limited to a smaller area. The positioning precisions of TBG and Octant may reach 60 km and 35 km respectively. WangGeo does not only consider the network delay and the network topological structure, but also combines with the zip codes on the web page, so that the positioning precision of WangGeo can reach 7 to 10 km.
The method based on database determines the location of the IP address according to IP registration information, DNS information, location information submitted by the user, etc. For example, if a company in Beijing is found to register an IP address, then it can be determined that the IP address is in Beijing. If the corresponding domain name of this IP address is found to be “router-1.haidian.chinanet.cn”, then the IP address may be determined to be in Haidian District of Beijing. Another method is based on the location information submitted by the users themselves. For example, the users may submit their IP addresses and related location information via a location sharing website.
The comparisons between conventional methods for positioning IP location are shown in Table 1. As shown in Table 1, it can be summarized as follows.
1. The method based on delay measurement has a long response time and a high deployment cost, and the highest positioning precision can reach up to 7 to 10 kilometers;
2. The method based on database has a short response time and a low deployment cost, but also a low positioning precision;
3. In the case of the application requirement of the online advertisement whose precision should be on a street level such as within 2 kilometer, neither the above two methods can meet the requirement.
TABLE 1comparison of the conventional methodsmethod/responsearrange-productdata sourceprecisiontimementmethodGeoPingnetwork delay300 km dozens ofhundredsbasedCBGnetwork delay200 km secondsofonTBGnetwork delay60 kmto a fewserversdelayand topologyminutesarrangedmea-Octantnetwork delay35 kminsure-and topologydifferentmentWangGeonetwork delay,7-10 km areastopology andweb zip codemethodIP138,IP registra-aboveignorableignorablebasedIP.cntion, DNS, in-70 kmonformationdata-submittedbaseby the user